/**
 * 错误事件
 */
/**
 * 发送错误日志
 * @param	r_room		房间对象
 * @param	r_user		用户对象
 * @param	r_param		传递参数{cmd:,ac:,err:,data:}
 * @param	r_broad		广播用户 0为当前用户1为房间所有用户
 */
var errEvent = function(r_room,r_user,r_param,r_broad) { 
	var _params = { };
	_params._cmd = r_param['cmd'];
	var _data = { };
	if (chkParam('ac',r_param)) {
		_data['ac'] = r_param['ac'];
	}
	if (chkParam('err',r_param)) {
		_data['err'] = r_param['err'];
	}
	if (chkParam('data',r_param)) {
		_data['data'] = r_param['data'];		
	}
	_params.dataObj = _data;
	var _user_list = [];
	_user_list = (r_broad) ? r_room.getAllUsers() : [r_user];
	_server.sendResponse(_params, -1, null, _user_list, 'json');
}

